<template>
	<div>
		<canvas canvas-id="myCanvas"
			id="myCanvas"></canvas>
			<button @click="init">初始化</button>
	</div>
</template>

<script>
export default {
	methods: {
  init() {
		const context = uni.createCanvasContext('myCanvas')

uni.downloadFile({
	url: '/static/images/common/logo.png',
	success: function (res) {
context.save()
context.beginPath()
context.arc(96, 96, 48, 0, 2 * Math.PI)
context.clip()
context.drawImage(res.tempFilePath, 48, 48)
		context.restore()
		context.draw()
	}
})
  },
  setChart() {
  }
  }
}
</script>